package com.zch.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zch.dao.CompanyRegisterMapper;
import com.zch.dao.model.CompanyRegister;
import com.zch.dao.model.CompanyRegisterExample;
import com.zch.daoEx.CompanyRegisterMapperEx;
import com.zch.daoEx.model.CompanyRegisterEx;

@Service
public class CompanyRegisterService {
	@Autowired
	private CompanyRegisterMapper companyRegisterMapper;
	@Autowired
    private CompanyRegisterMapperEx companyRegisterMapperEx;

	public int countByExample(CompanyRegisterExample example) {
		return this.companyRegisterMapper.countByExample(example);
	}

	public CompanyRegister selectByPrimaryKey(String id) {
		return this.companyRegisterMapper.selectByPrimaryKey(id);
	}

	public List<CompanyRegister> selectByExample(CompanyRegisterExample example) {
		return this.companyRegisterMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(String id) {
		return this.companyRegisterMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(CompanyRegister record) {
	    this.companyRegisterMapperEx.updateCompanyRegisterByProjectMessage(record);
		return this.companyRegisterMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(CompanyRegister record) {
		return this.companyRegisterMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(CompanyRegisterExample example) {
		return this.companyRegisterMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(CompanyRegister record, CompanyRegisterExample example) {
		return this.companyRegisterMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(CompanyRegister record, CompanyRegisterExample example) {
		return this.companyRegisterMapper.updateByExample(record, example);
	}

	public int insert(CompanyRegister record) {
		return this.companyRegisterMapper.insert(record);
	}

	public int insertSelective(CompanyRegister record) {
		return this.companyRegisterMapper.insertSelective(record);
	}

    public List<CompanyRegisterEx> selectList(Map map) {
        return this.companyRegisterMapperEx.selectList(map);
    }

    public CompanyRegisterEx selectAppDetailByInside(Map<String, Object> map) {
        return this.companyRegisterMapperEx.selectAppDetailByInside(map);
    }

    public int updateRegisterMaster(String userId, String id) {
        this.companyRegisterMapperEx.updateRegisterMaster(userId,id);
        return this.companyRegisterMapperEx.updateRegisterMasterByProjectMessage(userId,id);
        
    }

    public List<CompanyRegisterEx> selectMyList(Map<String, Object> map) {
        return this.companyRegisterMapperEx.selectMyList(map);
    }

}
